package com.hncc.bms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hncc.bms.mapper.BmsInvoiceRecordMapper;
import com.hncc.bms.domain.BmsInvoiceRecord;
import com.hncc.bms.service.IBmsInvoiceRecordService;
import javax.annotation.Resource;

/**
 * 发票Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-04
 */
@Service
public class BmsInvoiceRecordServiceImpl implements IBmsInvoiceRecordService 
{
    @Resource
    private BmsInvoiceRecordMapper bmsInvoiceRecordMapper;

    /**
     * 查询发票
     * 
     * @param id 发票ID
     * @return 发票
     */
    @Override
    public BmsInvoiceRecord selectBmsInvoiceRecordById(Long id)
    {
        return bmsInvoiceRecordMapper.selectBmsInvoiceRecordById(id);
    }

    /**
     * 查询发票列表
     * 
     * @param bmsInvoiceRecord 发票
     * @return 发票
     */
    @Override
    public List<BmsInvoiceRecord> selectBmsInvoiceRecordList(BmsInvoiceRecord bmsInvoiceRecord)
    {
        return bmsInvoiceRecordMapper.selectBmsInvoiceRecordList(bmsInvoiceRecord);
    }

    /**
     * 新增发票
     * 
     * @param bmsInvoiceRecord 发票
     * @return 结果
     */
    @Override
    public int insertBmsInvoiceRecord(BmsInvoiceRecord bmsInvoiceRecord)
    {
        bmsInvoiceRecord.setCreateTime(DateUtils.getNowDate());
        return bmsInvoiceRecordMapper.insertBmsInvoiceRecord(bmsInvoiceRecord);
    }

    /**
     * 修改发票
     * 
     * @param bmsInvoiceRecord 发票
     * @return 结果
     */
    @Override
    public int updateBmsInvoiceRecord(BmsInvoiceRecord bmsInvoiceRecord)
    {
        return bmsInvoiceRecordMapper.updateBmsInvoiceRecord(bmsInvoiceRecord);
    }

    /**
     * 批量删除发票
     * 
     * @param ids 需要删除的发票ID
     * @return 结果
     */
    @Override
    public int deleteBmsInvoiceRecordByIds(Long[] ids)
    {
        return bmsInvoiceRecordMapper.deleteBmsInvoiceRecordByIds(ids);
    }

    /**
     * 删除发票信息
     * 
     * @param id 发票ID
     * @return 结果
     */
    @Override
    public int deleteBmsInvoiceRecordById(Long id)
    {
        return bmsInvoiceRecordMapper.deleteBmsInvoiceRecordById(id);
    }
}
